package com.wind.taobao.api.huabao.rest
{
	import com.wind.taobao.api.huabao.convert.PosterChannelConvert;
	import com.wind.taobao.core.webservice.TaobaoResponse;

	import mx.collections.ArrayCollection;

	/**
	 * taobao.huabao.channels.get Response
	 * @author fxy
	 *
	 */
	public class HuabaoChannelsGetResponse extends TaobaoResponse
	{
		public var channels:ArrayCollection;

		public function HuabaoChannelsGetResponse(response:TaobaoResponse=null)
		{
			super(response);
			initChannels();
		}

		private function initChannels():void
		{
			if (body != null && this.isSuccess)
			{
				if (this.format == "xml")
				{
					//暂未实现
				}
				else
				{
					if (body["rsp"].hasOwnProperty("channels"))
						channels=PosterChannelConvert.convertPosterChannels(body["rsp"]["channels"]);
				}
			}
		}
	}
}